package com.gobi.ribbon.consumer.controller;

import com.gobi.ribbon.consumer.service.RibbonConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class HelloControler {

    @Autowired
    RibbonConsumerService ribbonConsumerService;

    @GetMapping(value = "/ribbon")
    public String hello(@RequestParam(defaultValue = "gobi") String name) {
        return ribbonConsumerService.hello( name );
    }
}
